import request from '@/utlis/request.js'

// 获取分类列表
export function getCategoryListApi(data) {
	return request.post('/cate/list', data)
}
//根据分类id获取商品
export function getGoodsByIdApi(data) {
	return request.post('/goods/list', data)
}

//新增分类 
export function addCategorytApi(data) {
	return request.post('/cate/add', data)
}
//编辑分类
export function editCategorytApi(data) {
	return request.post('/cate/edit', data)
}
//删除分类
export function deleteCategoryApi(data) {
	return request.post('/cate/delete', data)
}
//获取总分类列表
export function getTotalCategoryListApi(data) {
	return request.get('/cate/select', data)
}

// 添加物料
export function addGoodsApi(data) {
	return request.post('/goods/add', data)
}

// 删除物料
export function deleteGoodsApi(data) {
	return request.post('/goods/delete', data)
}

//编辑物料
export function editGoodsApi(data) {
	return request.post('/goods/edit', data)
}

//生成条码
export function generateBarcodeApi() {
	return request.get('/goods/barcode')
}

//获取物料计量单位 
export function getGoodsUnitApi(data) {
	return request.post('/goods/unit', data)
}

//获取供应商
export function getsupplierListApi(data) {
	return request.post('/supplier/list', data)
}

//获取入库类型
export function getputInTypeListApi(data) {
	return request.get('/dict/receipt', data)
}

// 物料入库 
export function storageOfMaterialsApi(data) {
	return request.post('/receipt/add', data)
}

// 物料盘点
export function cargoInventoryApi(data) {
	return request.post('/stockCheck/add', data)
}

// 物料盘点记录
export function getCargoInventoryRecordListApi(data) {
	return request.post('/stockCheck/list', data)
}